#include <iostream>
#include <cstring>
#include <stdlib.h>
using namespace std;

int main() {

    char str[100] = { 0 };
    cin.getline(str, sizeof(str));
    //str[0,1,2]  str[4,5,6] str[8,9,10]
    // write your code here......
    int space=0;
    string c="";
    string a="";
    string b="";
    int a1=0,b1=0;
    for(int i=0;str[i]!='\0';i++)    //字符串以'\0'结尾
    {
        if(str[i]== ' ') space++; 
        if(space == 0) c+=str[i];
        if(space == 1) a+=str[i];
        if(space == 2) b+=str[i];
    }
    a1=stoi(a);b1=stoi(b);

    if(str[0]=='a' || str[0]=='A') cout<<a1+b1;
    if(str[0]=='s' || str[0]=='S') cout<<a1-b1;
    if(str[0]=='m' || str[0]=='M') cout<<a1*b1;
    if(str[0]=='d' || str[0]=='D') {
        if(b1==0) cout<<"Error";
        else cout<<a1/b1;
    }
    return 0;
}